package com.pan.admin.common.constant;

/**
 * @author Pan
 */
public enum ApiServiceEnum {

    A0001("A0001", "撞库接口"),
    A0002("A0002", "进件申请接口"),
    A0003("A0003", "进件状态查询接口"),
    ;

    private final String code;
    private final String name;

    private ApiServiceEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static ApiServiceEnum get(String code) {
        ApiServiceEnum[] values = ApiServiceEnum.values();
        for (ApiServiceEnum apiServiceEnum : values) {
            if (apiServiceEnum.getCode().equals(code)) {
                return apiServiceEnum;
            }
        }
        return null;
    }

}
